package com.cqc.zhbjcqc.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.cqc.zhbjcqc.fragment.frag2.fragnews.FragNewsItem;

import java.util.List;

/**
 * Created by cui on 2016/9/28.
 */

public class FragNewsAdapter extends BaseFragmentPagerAdapter<FragNewsItem> {
    public List<String> titleList;
    public List<FragNewsItem> list;
    public FragNewsAdapter(FragmentManager fm, List<FragNewsItem> list,List<String> titleList) {
        super(fm, list);
        this.titleList = titleList;
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titleList.get(position);
    }
}
